Standard Plugin Functions

Each plugin must include and export two functions: GetInfo and Execute. GetInfo is used by Constructor when the program starts to get the information about the plugin which is placed in the text of the menu item used to represent it. Execute is called when the user clicks on that menu item.


GetInfo

The GetInfo function is called when Constructor starts to get information about each plugin. If this function fails, the plugin is not shown in the list in the Tools menu.

GetInfo is defined as the following:

void __stdcall GetInfo(
                      char ** GetName,
                      char ** GetDescription,
                      int * GetMajorVerNo,
                      int * GetMinorVerNo
                      )


Parameters:

GetName
    Points to a string to hold the name of the plugin

GetDescription
    Points to a string to hold the description of the plugin. This is shown as a help hint in the status bar of Constructor

GetMajorVerNo
    Points to an integer to hold the major version number of the plugin. For example, for version 1.0 of the plugin, this would point to 1

GetMinorVerNo
    Points to an integer to hold the minor version number of the plugin. For version 1.0, this would point to 0.

Return Value

This function does not return a value.


Execute

The Execute function is called when the plugin is run by clicking on it's menu item in the Tools menu in Constructor.

Execute is defined as the following:

RETVAL __stdcall Execute(
                        char * Text,
                        char * Selected,
                        )


Parameters:

Text
    Contains all the text in the current document in Constructor

Selected
    Contains the selected text in the current document

Return Value

The function returns a RETVAL structure